# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: John D Jones III AKA jnbek <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator  : CPANPLUS::Dist::Arch 1.32

pkgname='perl-config-autoconf'
_dist="Config-AutoConf"
pkgver=0.317
pkgrel=1
pkgdesc="A module to implement some of AutoConf macros in pure perl."
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-capture-tiny')
makedepends=('bison' 'flex' 'gawk' 'grep' 'pkg-config' 'sed')
url='https://metacpan.org/release/Config-AutoConf'
source=("http://search.cpan.org/CPAN/authors/id/R/RE/REHSACK/${_dist}-${pkgver}.tar.gz")
md5sums=('29f87fc7803f1725f6daafcf416089ce')
sha256sums=('01e4b22d2fecb7cfd3cc1f4dabe95cd137cf249cc5e38184f88556e5c98a9ce1')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
